<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<style type="text/css">
.dateWidth1 {
	width: 195px;
}

.select_width {
	width: 130px;
}
</style>
<script type="text/javascript">
function initTreeValueExt(treeId, treeNode) {

	var inputId = treeId.substring(0, treeId.lastIndexOf('_'));
	if (!(treeNode && (treeNode.level > 0 || !treeNode.isParent))) {
		scmWarn($("#" + treeId).attr("label")
				+ messageTip.researchAreaInvalidDisciplineCode);
		if (treeNode.level == 0) {
			$("#" + treeId).val("");
			$("#" + treeId).parents("td").find("[name$='" + inputId + "_code'],[id$='" + inputId+ "_code']").val("");
			$("#" + treeId).parents("td").find("[name$='" + inputId + "_value'],[id$='" + inputId+ "_value']").val("");
			$("#" + treeId).parents("td").find("[name$='" + inputId + "_name'],[id$='" + inputId+ "_name']").val("");
		}
		return false;
		}
		var str = treeNode.name;
		var obj = treeNode.parentNode;
		while (obj != null) {
			//str = obj.name + "-" + str;
			obj = obj.parentNode;
		}
		$("#" + treeId).parents("td").find("[name$='" + inputId + "_code'],[id$='" + inputId+ "_code']").val(treeNode.id);
		$("#" + treeId).parents("td").find("[name$='" + inputId + "_value'],[id$='" + inputId+ "_value']").val(treeNode.id);
		$("#" + treeId).parents("td").find("[name$='" + inputId + "_name'],[id$='" + inputId+ "_name']").val(str);
	}
function  selectPsnCall(data) {
	$(document).find("input[name$='psn_code']").val(data.person.psnCode);
	$("#zh_name").html(data.personExtend.basic_info.zh_name);
	$("#prof_title_name").html(data.personExtend.basic_info.prof_title_name);
	$("#position").html(data.personExtend.basic_info.position);
	$("#mobile").html(data.personExtend.basic_info.mobile);
	$("#email").html(data.personExtend.basic_info.email);
	$("#tel_work").html(data.personExtend.contact.tel_work);
	<security:authorize ifAnyGranted="A_MENU_MANAGE_19">
	$("#depart_code").val(data.person.deptCode);
	</security:authorize>
	tb_remove2();
}
function localInitTreeValue(treeId, treeNode) {
	var str = treeNode.name;
	var obj = treeNode.parentNode;
	if (!(treeNode && (treeNode.level > 0 || !treeNode.isParent))) {
		scmWarn($("#" + treeId).attr("label")
				+ messageTip.researchAreaInvalidDisciplineCode);
		return false;
	}
	var showName = "";
	var parentId="";
	if (obj != null) {
	    str = obj.name + "-" + str;
		//obj = obj.parentNode;
		showName = obj.name;
		parentId=obj.id;
		$("#" + treeId).parents("tr").find("[name$='domain_value']").val(treeNode.id);
		$("#" + treeId).parents("tr").find("[name$='subject_no']").val(str.split("_")[1]);
		$("#" + treeId).parents("tr").find("[name$='domain_name']").text(treeNode.name.split("_")[0]);
		$("#" + treeId).parents("td").find("[name$='" + treeId + "_value'],[id$='" + treeId + "_value']").val(parentId);
		$("#" + treeId).parents("td").find("[name$='" + treeId + "_name'],[id$='" + treeId + "_name']").val(showName);
		$("#" + treeId).parents("td").find("[name$='" + treeId + "_all_name'],[id$='" + treeId + "_all_name']").val(str);
		$("#" + treeId).parents("td").find("[name$='" + treeId + "_all_value'],[id$='" + treeId + "_all_value']").val(treeNode.id);
	}else{
		$("#"+treeId).parents("tr").find("[name$='domain_value']").val("");
		$("#"+treeId).parents("tr").find("[name$='subject_no']").val("");
	    $("#"+treeId).parents("tr").find("[name$='domain_name']").text("");
		$("#" + treeId).parents("td").find("[name$='" + treeId + "_all_name'],[id$='" + treeId + "_all_name']").val("");
		$("#" + treeId).parents("td").find("[name$='" + treeId + "_all_value'],[id$='" + treeId + "_all_value']").val("");
		$("#" + treeId).parents("td").find("[name$='" + treeId + "_value'],[id$='" + treeId + "_value']").val(treeNode.id);
		$("#" + treeId).parents("td").find("[name$='" + treeId + "_name'],[id$='" + treeId + "_name']").val(str);
	}
	$("#" + treeId).val(str);
}
</script>
<input type="hidden" name="organizations/organization[0]/sequence_no" value="1" >
<input type="hidden" name="organizations/organization[0]@submit_org" value="1" >
<input type="hidden" name="organizations/organization[0]/org_code" value="<x:out select="$xmlData/data/organizations/organization[@submit_org=1]/org_code"/>" >

<table class="t_css  table01" width="100%" border="0" cellpadding="0"
	id="basicInfo1" cellspacing="1">
	<col style="width: 10%" />
	<col style="width: 20%" />
	<col style="width: 10%" />
	<col style="width: 20%" />
	<col style="width: 10%" />
	<col style="width: 20%" />
	<tr>
		<td colspan="6" class="t_bar2">基本信息</td>
	</tr>
	<tr>
		<td align="right"><span class="color_red">*</span>平台名称：</td>
		<td colspan="5"><input type="text" id="zh_title" name="proposal/zh_title" class="required" style="width: 70%" label="平台名称" value="<x:out select="$xmlData/data/proposal/zh_title" />" maxlength="100" /></td>
	</tr>
	<tr>
		<td align="right">依托单位：</td>
		<td colspan="5">
		<input type="hidden" name="organizations/organization[1]@submit_org"  value="1" />
		<span name="organizations/organization/org_name"><x:out select="$xmlData/data/organizations/organization[@submit_org='1']/org_name" /></span></td>
	</tr>
	<tr>
		<td align="right"><span class="color_red">*</span>所属领域：</td>
		<td>
		 <c:set var="grantCode"><x:out select="$xmlData/data/proposal/grant_code" /></c:set>
			<c:set var="sub"><x:out select="$xmlData/data/proposal/sub_grant_code" /></c:set>
			<c:set var="researcharea_all_value"><x:out select="$xmlData/data/proposal/researcharea_all_value" /></c:set>
			<c:set var="researcharea">{'id':'<x:out select="$xmlData/data/proposal/researcharea_all_value" />','name':'<x:out select="$xmlData/data/proposal/researcharea_all_name" />'}</c:set>
			<c:if test="${empty researcharea_all_value }"><c:set var="researcharea">{'id':'<x:out select="$xmlData/data/proposal/researcharea_value" />','name':'<x:out select="$xmlData/data/proposal/researcharea_name" />'}</c:set></c:if>
          	<cpt:tree key="researcharea1" cacheable="false" className="hn_iuput_kuang gray" readonly="true" value="${researcharea}"  label="所属领域"
          		id="researcharea" onlyChooseLeaf="true" showPattern="current" shieldPattern="0" topCheckbox="false" onClick="localInitTreeValue" sqlParamVal="{grant_code:${sub},stat_year:${param.statYear }}"/>
	        <input id="researcharea_value" type="hidden" name="proposal/researcharea_value" class="required" label="所属领域" value="<x:out select="$xmlData/data/proposal/researcharea_value" />"/>
            <input id="researcharea_name" type="hidden" name="proposal/researcharea_name"  value="<x:out select="$xmlData/data/proposal/researcharea_name" />"/>
             <input id="researcharea_all_name" type="hidden" name="proposal/researcharea_all_name"  value="<x:out select="$xmlData/data/proposal/researcharea_all_name" />"/>
			 <input  type="hidden" id="researcharea_all_value" name="proposal/researcharea_all_value"  value="<x:out select="$xmlData/data/proposal/researcharea_all_value" />"/>
		</td>
		<td align="right"><span class="color_red">*</span>建设类别：</td>
		<td>
			<c:set var="construction_category_value"><x:out select="$xmlData/data/proposal/construction_category_value" /></c:set>
			<cpt:checkbox key="construction_category" name="proposal/construction_category" value="${construction_category_value }" tagType="radio" repeatColumn="2"></cpt:checkbox>
			<input type="hidden" id="construction_category_value" name="proposal/construction_category_value" label="建设类别" class="required"  value="<x:out select="$xmlData/data/proposal/construction_category_value" />" />
			<input type="hidden" id="construction_category_name" name="proposal/construction_category_name" value="<x:out select="$xmlData/data/proposal/construction_category_name" />" />
		</td>
		<td align="right"><span class="color_red">*</span>平台类型：</td>
		<td>
			<c:set var="platform_type_value"><x:out select="$xmlData/data/proposal/platform_type_value" /></c:set>
			<cpt:checkbox key="platform_type" name="proposal/platform_type" value="${platform_type_value }" tagType="radio"></cpt:checkbox>
			<input type="hidden" id="platform_type_value" name="proposal/platform_type_value" label="平台类型" class="required"  value="<x:out select="$xmlData/data/proposal/platform_type_value" />" />
			<input type="hidden" id="platform_type_name" name="proposal/platform_type_name" value="<x:out select="$xmlData/data/proposal/platform_type_name" />" />
		</td>
	</tr>
	<tr>
		<td align="right"><span class="color_red">*</span>组建时间：</td>
		<td>
			<c:set var="build_time"><x:out select="$xmlData/data/proposal/build_time" /></c:set>
			<cpt:date id="build_time" size="15" name="proposal/build_time" value="${build_time }" className="required date" label="组建时间" ></cpt:date>
		</td>
		<td align="right"><span class="color_red">*</span>批准文号：</td>
		<td>
		<input type="text" id="approval_number" name="proposal/approval_number" label="批准文号" class="required" maxlength="100" value="<x:out select="$xmlData/data/proposal/approval_number" />"  />
		</td>
		<td align="right"><span class="color_red">*</span>验收时间：</td>
		<td>
		<c:set var="acceptance_time"><x:out select="$xmlData/data/proposal/acceptance_time" /></c:set>
		<cpt:date id="acceptance_time" size="15" name="proposal/acceptance_time" value="${acceptance_time }" className="required date dateCompareBeforeE:build_time:acceptance_time" label="验收时间" ></cpt:date>
		</td>
	</tr>
	<tr>
		<td align="right"><span class="color_red">*</span>通讯地址：</td>
		<td colspan="5">
			<input type="text" id="postal_address" name="proposal/postal_address" label="通讯地址" class="required" maxlength="100" style="width: 70%" value="<x:out select="$xmlData/data/proposal/postal_address" />" />
		</td>
	</tr>
	<tr>
		<td align="right">归口管理部门：</td>
		<td colspan="2"><x:out select="$xmlData/data/proposal/tjbm_org_name" /></td>
		<td align="right"><span class="color_red">*</span>申报日期：</td>
		<td colspan="2">
		<c:set var="submit_date"><x:out select="$xmlData/data/proposal/submit_date" /></c:set>
		<cpt:date id="submit_date" label="申报日期" className="required date" name="proposal/submit_date" value="${submit_date }"></cpt:date>
		</td>
	</tr>
</table>
<table class="t_css  table01" width="100%" border="0" cellpadding="0"
	id="basicInfo1" cellspacing="1">
	<col style="width: 10%" />
	<col style="width: 20%" />
	<col style="width: 10%" />
	<col style="width: 20%" />
	<col style="width: 10%" />
	<col style="width: 20%" />
	<tr>
		<td colspan="6" class="t_bar2">负责人信息</td>
	</tr>
	<tr>
		<td align="right" rowspan="3">平台负责人：</td>
		<td rowspan="3">
			<input type="hidden" name="zh_persons/zh_person[1]@submit_psn" value="1"/>
			<span id="zh_name" name = "proposal/zh_name"><x:out select="$xmlData/data/zh_persons/zh_person[@submit_psn='1']/basic_info/zh_name" /></span>
		</td>
		<td  align="right">职称：</td>
		<td>
		<input type="hidden" name="organization_persons/person[1]@sequence_no" value="1" />
		<span id="prof_title_name" name = "proposal/prof_title_name"><x:out select = "$xmlData/data/zh_persons/zh_person[@submit_psn='1']/basic_info/prof_title_name" /></span>
		</td>
		<td  align="right">职务：</td>
		<td>
		<input type="hidden" name="zh_persons/zh_person[1]@submit_psn" value="1"/>
		<span id="position" name = "proposal/position"><x:out select="$xmlData/data/zh_persons/zh_person[@submit_psn='1']/basic_info/position" /></span>
		</td>
	</tr>
	<tr>
		<td  align="right">手机：</td>
		<td>
		<input type="hidden" name="zh_persons/zh_person[1]@submit_psn" value="1"/>
		<span id="mobile" name = "proposal/mobile"><x:out select="$xmlData/data/zh_persons/zh_person[@submit_psn='1']/contact/mobile" /></span>
		</td>
		<td  align="right">Email：</td>
		<td>
		<input type="hidden" name="zh_persons/zh_person[1]@submit_psn" value="1"/>
		<span id="email" name = "proposal/email"><x:out select="$xmlData/data/zh_persons/zh_person[@submit_psn='1']/contact/email" /></span>
		</td>
	</tr>
	<tr>
		<td  align="right">联系电话：</td>
		<td colspan="3">
		<input type="hidden" name="zh_persons/zh_person[1]@submit_psn" value="1"/>
		<span id="tel_work" name = "proposal/tel_work"><x:out select="$xmlData/data/zh_persons/zh_person[@submit_psn='1']/contact/tel_work" /></span></td>
	</tr>
	</table>
	<table class="t_css  table01" width="100%" border="0" cellpadding="0"
	id="lxr" cellspacing="1">
	<col style="width: 10%" />
	<col style="width: 20%" />
	<col style="width: 10%" />
	<col style="width: 20%" />
	<col style="width: 10%" />
	<col style="width: 20%" />
	<tr>
		<td colspan="6" class="t_bar2"><span class="color_red">*</span>联系人信息</td>
	</tr>
	<tr>
		<td align="right" rowspan="2">联系人：</td>
		<td rowspan="2">
		<input type="text" name="proposal/contact_psn_cname" class="input_css required" label="联系人" maxlength="100" value="<x:out select="$xmlData/data/proposal/contact_psn_cname" />" />
		</td>
		<td align="right">职称：</td>
			<td>
			<c:set var="contact">{'id':'<x:out select="$xmlData/data/proposal/contact_value" />','name':'<x:out select="$xmlData/data/proposal/contact_name" />'}</c:set>
			<cpt:tree key="prof_title" cacheable="false" width="100px" readonly="true" value="${contact}" id="contact" name="contact"  showPattern="all" shieldPattern="-1" onClick="initTreeValueExt" />
			<input type="hidden" id="contact_value" name="proposal/contact_value" value="<x:out select="$xmlData/data/proposal/contact_value" />" class="required"  label="职称"/> 
			<input type="hidden" id="contact_name" name="proposal/contact_name" value="<x:out select="$xmlData/data/proposal/contact_name" />" />
			</td>
		<td  align="right">职务：</td>
		<td>
		<input type="text" name="proposal/contact_psn_position" class="input_css required" label="职务" maxlength="100" value="<x:out select="$xmlData/data/proposal/contact_psn_position" />" />
		</td>
	</tr>
	<tr>
		<td  align="right">手机：</td>
		<td>
		<input type="text" name="proposal/contact_psn_mobile" class="input_css required mobile" label="手机" onfocus="InitInput.setNumber(this,11,0,0)" maxlength="11" value="<x:out select="$xmlData/data/proposal/contact_psn_mobile" />" />
		</td>
		<td  align="right">Email：</td>
		<td>
		<input type="text" name="proposal/contact_psn_email" class="input_css required email" label="Email" maxlength="100" value="<x:out select="$xmlData/data/proposal/contact_psn_email" />" />
		</td>
	</tr>
	</table>
<script type="text/javascript">
	
</script>

